import 'package:favorcate/ui/pages/detail/detail.dart';
import 'package:favorcate/ui/pages/filter/filter.dart';
import 'package:favorcate/ui/pages/main/main.dart';
import 'package:favorcate/ui/pages/meal/meal.dart';
import 'package:flutter/material.dart';

class ZSRouter {
  static const initialRoute = ZSMainScreen.routeName;

  static final Map<String, WidgetBuilder> routes = {
    ZSMainScreen.routeName: (ctx) => ZSMainScreen(),
    ZSMealScreen.routeName: (ctx) => ZSMealScreen(),
    ZSDetailScreen.routeName: (ctx) => ZSDetailScreen()
  };

  static final RouteFactory generateRoute = (settings) {
    if (settings.name == ZSFilterScreen.routeName) {
      return MaterialPageRoute(
          builder: (ctx) {
            return ZSFilterScreen();
          },
          fullscreenDialog: true);
    }
    return null;
  };

  static final RouteFactory unknownRoute = (settings) {
    return null;
  };
}
